<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     template="../../Template.xhtml"
>
<ui:define name="title">Edit Transport</ui:define>

<ui:define name="body">

<h:form>
	<p:panelGrid columns="2">
<h2>Edit Transport</h2>
<p:commandButton value="Back" action="ManageTransport.xhtml" />
</p:panelGrid>
</h:form>
<p:inputText  value="#{transportCatMB.id}" />
<br/><br/><br/><br/>
<h:form enctype="multipart/form-data">
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />

	<p:panelGrid columns="3">
	  <p:outputLabel value="Select Transport Category:" />
	  <p:selectOneMenu value="#{transportCatMB.idT}" >
	  	<f:selectItems  value="#{transportCatMB.listTransportt}" var="a" itemValue="#{a.idTransport}" itemLabel="#{a.intitule}" />
	  </p:selectOneMenu><br/>
	  
		<p:outputLabel value="Transport Type:"/>
		<p:inputText id="intitule" value="#{transportCatMB.tr.intitule}" required="true" requiredMessage="Transport type is required" />
		<p:message for="intitule" />
		
		<p:outputLabel value="Description:"/>
		<p:inputText id="description" value="#{transportCatMB.tr.description}" required="true" requiredMessage="Description is required" />
		<p:message for="description" />
		
		<p:outputLabel value="Icon"/>
		<p:inputText id="Icon" value="#{transportCatMB.tr.iconImage}"  />
		
		<p:message for="Icon" />
		
		<p:outputLabel value="Status :" />
		<p:selectOneMenu value="#{transportCatMB.tr.statut}" >
			<f:selectItem  itemValue="true" itemLabel="Active"  />
			<f:selectItem  itemValue="false" itemLabel="Inactive"  />
		</p:selectOneMenu><br/>
		<p:commandButton action="#{transportCatMB.Modifier}" value="Update" ></p:commandButton>
	</p:panelGrid>
</h:form>
	
	
</ui:define>
</ui:composition>